$(document).ready(function(){
    $('#access-select').change(function(){
        var selected = $('#access-select option:selected').val();        
        if(selected==1){
            $('#ajax-userlist').slideDown();
            $('#user-check-list').empty();
            $('#user-check-list').addClass('loading');
            $.ajax({
                type: 'GET',
                url: './SourceCode/dangky_check.php',
                data: 'users=load',
                success: function(server_response) {
                    $('#user-check-list').append(server_response);
                    $('#user-check-list').removeClass('loading');
                }
            });
        }
        if(selected==0){
            $('#ajax-userlist').slideUp();
        }
    });
});